package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IIdeaBackActivityModel;
import com.wgts.wgts.mvp.model.imp.IdeaBackActivityModel;
import com.wgts.wgts.mvp.presenter.IIdeaBackActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.IdeaBackActivityPresenter;
import com.wgts.wgts.mvp.view.IIdeaBackActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/1810:14
 *
 */
@Module
public class IdeaBackActivityModule {
    private IIdeaBackActivityView view;

    public IdeaBackActivityModule(IIdeaBackActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IIdeaBackActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IIdeaBackActivityModel provideModel(NetService netService){
        return new IdeaBackActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IIdeaBackActivityPresenter providePresenter(IIdeaBackActivityView view, IIdeaBackActivityModel model){
        return new IdeaBackActivityPresenter(view, model);
    }
}
